package fr.norsys.mapper.console.model;

import java.util.Comparator;

public class ApplicationNameComparator implements Comparator {

	public int compare(Object o1, Object o2) {
		int comp = 0;
		if(o1 instanceof Application && o2 instanceof Application) {
			Application r1 = (Application) o1;
			Application r2 = (Application) o2;
			if(r1.getName()!=null && r2.getName()!=null){
				comp = r1.getName().compareTo(r2.getName());
			}
		}
		return comp; 
	}
}
